<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let sbo1 = Symbol()
        let obj1 = {
            name: 'zs',
            age: 19,
            [sbo1]: 'symbol'
        }

        Object.prototype.zs = 'zs'
        obj1.__proto__.lisi = 'ls'

        let keys = Object.keys(obj1)

        // let keys = Object.keys(obj1)
        //ley keys = Object.keys(obj1)
        console.log(keys)
        // 获得obj1的所有键

        let vals = Object.values(obj1)

        //let vals = Object.values(obj1)
        //let vals = Object.values(obj1)
        console.log(vals)
        //获得obj1的所有值

        let kv = Object.entries(obj1)

        //ley kv = Object.entries(obj1)
        //let kv = Object.entried(obj1)
        console.log(kv)
        //获得obj1的所有键值对
        for (let [key, val] of kv) {
            console.log(key + ':--' + val)
        }

    </script>
</body>

</html>